<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>OA-部门管理</title>
		<link rel="stylesheet" href="../resource/layui/css/layui.css">
	</head>
	<body class="layui-layout-body">
		<div class="layui-layout layui-layout-admin">
			<div class="layui-layout layui-layout-admin">
				<div class="layui-header">
					<div class="layui-logo"><img src="../resource/image/logo.png" style="width: 200px; height: 58px;"></div>
					<!-- 头部区域（可配合layui已有的水平导航） -->
					<ul class="layui-nav layui-layout-left">
						<li class="layui-nav-item"><a href="">首页</a></li>
						<li class="layui-nav-item"><a href="">商品管理</a></li>
						<li class="layui-nav-item"><a href="">用户</a></li>
						<li class="layui-nav-item">
							<a href="javascript:;">其它系统</a>
							<dl class="layui-nav-child">
								<dd><a href="">邮件管理</a></dd>
								<dd><a href="">消息管理</a></dd>
								<dd><a href="">授权管理</a></dd>
							</dl>
						</li>
					</ul>
					<ul class="layui-nav layui-layout-right">
						<li class="layui-nav-item">
							<a href="javascript:;">
								<img src="http://t.cn/RCzsdCq" class="layui-nav-img">
								贤心
							</a>
							<dl class="layui-nav-child">
								<dd><a href="">修改个人信息</a></dd>
								<dd><a href="">安全设置</a></dd>
							</dl>
						</li>
						<li class="layui-nav-item"><a href="">退出</a></li>
					</ul>
				</div>


				<div class="layui-side layui-bg-black">
					<div class="layui-side-scroll">
						<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
						<ul class="layui-nav layui-nav-tree" lay-shrink="all" lay-filter="test">
							<li class="layui-nav-item">
								<a class="" href="javascript:;"><i class="layui-icon"> &#xe637; </i>考勤</a>
								<dl class="layui-nav-child">
									<dd><a href="punch.html">打卡</a></dd>
									<dd><a href="Empattence.html" class="layui-this" >自我考勤查看</a></dd>
									<dd><a href="Deptpattence.html" >部门考勤查看</a></dd>
									<dd><a href="Hrpattence.html">员工考勤查看</a></dd>
								</dl>
							</li>
							<li class="layui-nav-item">
								<a href="javascript:;"><i class="layui-icon">&#xe613; </i>请假管理</a>
								<dl class="layui-nav-child">
									<a href="leavepage.html"></i>请假申请</a>
									<dd><a href="leavelist.html">请假审批</a></dd>
								</dl>
							</li>
							<li class="layui-nav-item layui-nav-itemed"><a href="javascript:;"><i class="layui-icon">&#xe716; </i>管理</a>
								<dl class="layui-nav-child">
									<dd><a href="Emp.html">员工管理</a></dd>
									<dd><a href="Dept.html" class="layui-this">部门管理</a></dd>
									<dd><a href="userinfo.html">个人信息管理</a></dd>
								</dl>
							</li>
							<li class="layui-nav-item"><a href="Note.html">公告</a></li>
						</ul>
					</div>
				</div>

				<div class="layui-body">
					<!-- 内容主体区域 -->
					<div class="layui-container">
						<div class="layui-row" style="padding-top:150px;">

							<div class="layui-col-md1" >

								

							</div>
							<!-- 员工表格展示 -->
							<table class="layui-table" lay-filter="depttable">
								<form class="layui-form" action="" style="padding-bottom: 10px;">
									<div class="layui-inline">
										<input type="text" name="title" required lay-verify="required" placeholder="请输入部门关键字" autocomplete="off" class="layui-input">
									</div>
								
									<div class="layui-inline">
										<a href="" class="layui-btn layui-btn layui-btn-normal">查询部门</a>
									</div>
								
									<div class="layui-inline" style="padding-left: 437px;">
										<span data-method="offset" data-type="auto" class="layui-btn layui-btn layui-btn-normal" id="AddDept">添加部门</span>
									</div>
								
								</form>
								<thead>
									<tr>
										<th lay-data="{field:'deptid', width:200,sort:true}">部门编号</th>
										<th lay-data="{field:'deptname', width:200}">部门名称</th>
										<th lay-data="{field:'boosid', width:200}">部门经理编号</th>

										<th lay-data="{field:'empdo', width:200}">部门操作</th>
									</tr>
								</thead>

								<tbody>
									<tr>
										<td>A</td>
										<td>开发部</td>
										<td>A101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>B</td>
										<td>技术部</td>
										<td>B101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>C</td>
										<td>人事部</td>
										<td>C101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>D</td>
										<td>保卫科</td>
										<td>D101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>E</td>
										<td>销售部</td>
										<td>E101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>F</td>
										<td>公关部</td>
										<td>F101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>A</td>
										<td>开发部</td>
										<td>A101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>A</td>
										<td>开发部</td>
										<td>A101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>A</td>
										<td>开发部</td>
										<td>A101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>A</td>
										<td>开发部</td>
										<td>A101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>
									<tr>
										<td>A</td>
										<td>开发部</td>
										<td>A101</td>
										<td>
											<a href="" class="layui-btn layui-btn-xs layui-btn-normal">修改</a>
											<a href="" class="layui-btn layui-btn-xs layui-btn-danger" onclick="javascript:return del();">删除</a>
										</td>
									</tr>

									<!-- 分页选项栏-->

								</tbody>
							</table>


							<!-- 表格结束 -->
						</div>
					</div>
				</div>
			</div>

			<div class="layui-footer">
				<!-- 底部固定区域 -->
				© 中软 - JAVA二阶段项目 - 基于人脸识别的考勤系统 by TeamWork_XM
			</div>
		</div>
		<script src="../resource/layui/layui.js"></script>
		<script>
			//JavaScript代码区域
			layui.use('element', function() {
				var element = layui.element;
			});
			//表单js部分
			//Demo
			layui.use('form', function() {
				var form = layui.form;
				//监听提交
				form.on('submit(formDemo)', function(data) {
					layer.msg(JSON.stringify(data.field));
					return false;
				});
			});
			layui.use('table', function() {
				var table = layui.table;

				table.init('depttable', {
					height: 472,
					width: 805,
					limit: 10,
					page: true,
				})
			})
		</script>
		
		<!-- 弹出层 -->
		<script type="text/javascript">
			layui.use('layer', function() { //独立版的layer无需执行这一句
				var $ = layui.jquery,
					layer = layui.layer; //独立版的layer无需执行这一句
				//触发事件
				var active = {
					offset: function(othis) {
						var type = othis.data('type'),
							text = othis.text();
						layer.open({
							title: '添加部门',
							type: 2,
							offset: type
								//,id: 'layerDemo'+type //防止重复弹出
								,
							anim: 5 //弹窗特效
								,
							content: 'AddDept.html' //ifame的页面
								,
							maxmin: true,
							area: ['800px', '500px']
								//, shadeClose: true
								,
							btn: '关闭',
							btnAlign: 'c' //按钮居中
								,
							shade: 0.1 //不显示遮罩
								,
							yes: function() {
								layer.closeAll();
							}
						});
					}
				};
				$('#AddDept').on('click', function() {
					var othis = $(this),
						method = othis.data('method');
					active[method] ? active[method].call(this, othis) : '';
				});
		
			});
		</script>
		<!-- 删除按钮弹框 -->
		<script type="text/javascript">
			function del() {
			var msg = "请确定删除该部门";
			if (confirm(msg)==true){
			return true;
			}else{
			return false;
			}
			}
		</script>
	</body>
</html>
